class Listinfo():
  def __init__(self,my_list):
    self.list=my_list
  def add_key(self,keyname):
    if isinstance(keyname,(str,int)):
      self.list.append(keyname)
      return self.list
    return "error"
  def get_key(self,num):
    if num>0 and num<len(self.list):
      return self.list[num]
    return "error"
  def del_key(self,num):
    if num>0 and num<len(self.list):
      del self.list[num]
      return self.list
    return "超出取值范围"
  def update_list(self,list1):
    if isinstance(list1,list):
      self.list.extend(list1)
      return self.list
    return "类型错误"
  def del_key(self):
    a=self.list.pop(-1)
    return a
a=Listinfo([1,2,3,4,5,"sss","333"])
print(a.add_key(6))
print(a.get_key(2))
print(a.update_list(["a","b"]))
print(a.del_key())
